Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: run build command #360

Merged
merged 1 commit into from
Nov 24, 2023
Merged

fix: run build command #360

merged 1 commit into from
Nov 24, 2023

Conversation

Zir0h
Copy link
Contributor

@Zir0h Zir0h commented Nov 24, 2023

I was getting "Uncaught ReferenceError: require is not defined" applying this to vite.config seems to fix it

This is important because we do not use the builtin webserver to display the UI.

I found the solution on vitejs/vite#3409 (comment)

Copy link

github-actions bot commented Nov 24, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-11-24 16:08 UTC

@Zir0h
Copy link
Contributor Author

Zir0h commented Nov 24, 2023

I pushed an old image to prod, otherwise the users were greeted with a blank page 😅

@Zir0h Zir0h requested a review from melMass November 24, 2023 14:57
@Zir0h Zir0h added 🐛 bug Something isn't working 🫡 Priority: High After critical issues are fixed, these should be dealt with before any further issues. labels Nov 24, 2023
@Zir0h
Copy link
Contributor Author

Zir0h commented Nov 24, 2023

Looks like this was fixed "the right way" in vite 5: vitejs/vite@1061bbd

@melMass
Copy link
Member

melMass commented Nov 24, 2023

Why would we need to support require? I think the full codebase is ESM compliant

@Zir0h
Copy link
Contributor Author

Zir0h commented Nov 24, 2023

Why would we need to support require? I think the full codebase is ESM compliant

If you create a build with npm run build and then launch it with cd build/; python3 -m http.server 9000 or with docker compose up you get a blank page. Could it be because of a dependency?

@Zir0h Zir0h merged commit 1a4c9cb into main Nov 24, 2023
3 checks passed
@Zir0h Zir0h deleted the fix-npm-run-build branch November 24, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🫡 Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants